<script>
    const obj = {
        firstName: '张',
        lastName: '三',
        get fullName() {
            return this.firstName + this.lastName;
        }
    }
    const proxy = new Proxy(obj, {
        get(target, key, receiver) {
            console.log('getter'); 
            return Reflect.get(target, key, receiver);
        }, 
        set(target, key, value, receiver) {
            console.log('setter');
            return Reflect.set(target, key, value);
        }
    })

    console.log(proxy.fullName); // 张三  getter打印三次
    

    
</script>